<script id="list-tpl" type="text/html"
        data-params='{"url":"/education/admin/role","dataName":"roleData","pageid":"#page", "method":"post"}'>
    <table id="example" class="layui-table lay-even" data-name="roleData" data-tplid="list-tpl">
        <thead>
            <tr>
                <th width="30"><input type="checkbox" id="checkall" data-name="checkbox" lay-filter="check"
                                      lay-skin="primary"></th>
                <th width="100">角色编码</th>
                <th width="150">角色名称</th>
                <th>备注</th>
                <th width="150">操作</th>
            </tr>
        </thead>
        <tbody>
            {{# layui.each(d.list, function(index, item){ }}
            <tr>
                <td><input type="checkbox" name="checkbox" value="{{ item.ids}}" lay-skin="primary"></td>
                <td>
                    {{ item.ids }}
                </td>
                <td class="edit" data-list='{"key":"id={{ item.ids}}","filed":"names","render":"true"}'
                    data-params='{"url":"/education/admin/role/updateOptional", "data":"ids={{ item.ids}}" }'>
                    {{ item.names }}
                </td>
                <td class="edit" data-list='{"key":"id={{ item.ids}}","filed":"description","render":"true"}'
                    data-params='{"url":"/education/admin/role/updateOptional", "data":"ids={{ item.ids}}" }'>
                    {{ item.description||'' }}
                </td>
                <td>
                    <!--<button class="layui-btn layui-btn-mini modal-catch"
                            data-params='{"content": ".add-subcat","area":"600px,400px","title":"回复{{ item.createusername}}","key":"ids={{ item.ids }}","type":"1"}'>
                        <i class="iconfont">&#xe653;</i>授权
                    </button>-->
                    <a class="layui-btn layui-btn-mini layui-btn-normal"
                       onclick="setRoleOperator('{{ item.ids}}', '{{ item.names}}');" >
                        <i class="iconfont">&#xe653;</i>授权
                    </a>
                    <button class="layui-btn layui-btn-mini layui-btn-danger ajax"
                            data-list='{"key":"id={{ item.ids}}","msg":true,"render":"true","action":"del"}'
                            data-params='{"url": "/education/admin/role/delete","data":"ids={{ item.ids}}", "method":"post", "confirm":"true"}'>
                        <i class="iconfont">&#xe626;</i>删除
                    </button>
                </td>
            </tr>
            {{# }); }}
        </tbody>

    </table>
</script>